package com.remist.service.impl;

import java.util.List;

import com.remist.dao.impl.ProductDao;
import com.remist.model.Product;
import com.remist.model.ProductType;
import com.remist.service.ProductService;

public class ProductServiceImpl implements ProductService {
	private ProductDao productDao;
	public ProductDao getProductDao() {
		return productDao;
	}

	public void setProductDao(ProductDao productDao) {
		this.productDao = productDao;
	}

	public Product addProduct(Product productBean) {
		return productDao.addProduct(productBean);
	}

	public boolean updateProduct(Product productBean) {
		return productDao.updateProduct(productBean);
	}

	public boolean deleteProduct(Product productBean) {
		return productDao.deleteProduct(productBean);
	}

	public List<Product> getProductByType(ProductType productType) {
		return productDao.getProductByType(productType);
	}

	public List<Product> getAllProduct(int beginRecord, String whereCondition) {
		return productDao.getAllProduct(beginRecord, whereCondition);
	}

	public Product getProductById(Product productBean) {
		return productDao.getProductById(productBean);
	}

}
